home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / swingall.jar / javax / swing / plaf / basic / BasicTreeUI$TreeExtendSelectionAction.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-07-15  |  1.4 KB  |  38 lines

  1. package javax.swing.plaf.basic;
  2.  
  3. import java.awt.event.ActionEvent;
  4. import javax.swing.AbstractAction;
  5. import javax.swing.tree.TreePath;
  6.  
  7. class BasicTreeUI$TreeExtendSelectionAction extends AbstractAction {
  8.    // $FF: synthetic field
  9.    private final BasicTreeUI this$0;
  10.  
  11.    public BasicTreeUI$TreeExtendSelectionAction(BasicTreeUI var1, String var2) {
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    public void actionPerformed(ActionEvent var1) {
  16.       if (this.this$0.tree != null && this.this$0.getRowCount(this.this$0.tree) > 0) {
  17.          int var2 = BasicTreeUI.access$5(this.this$0);
  18.          if (var2 != -1) {
  19.             TreePath var3 = BasicTreeUI.access$4(this.this$0);
  20.             TreePath var4 = BasicTreeUI.access$9(this.this$0);
  21.             int var5 = this.this$0.getRowForPath(this.this$0.tree, var4);
  22.             if (var5 == -1) {
  23.                var5 = 0;
  24.             }
  25.  
  26.             this.this$0.tree.setSelectionInterval(var5, var2);
  27.             BasicTreeUI.access$3(this.this$0, var3);
  28.             BasicTreeUI.access$2(this.this$0, var4);
  29.          }
  30.       }
  31.  
  32.    }
  33.  
  34.    public boolean isEnabled() {
  35.       return this.this$0.tree != null && this.this$0.tree.isEnabled();
  36.    }
  37. }
  38.